<extend name="Base/no_side_common" />
<block name="body">
  <div class="wrap" style="clear:both; margin:30px auto;">
    <section class="tab-content" id="contents"> 
      
      <!-- 数据列表 -->
      <div style="overflow:hidden; zoom:1;">
        <h3 style=" float:left;margin-bottom:15px;"><img style="vertical-align:middle; height:30px" src="__IMG__/weixin.png"/> 我的公众号</h3>
        <div style="margin:0 0 15px 0; float:right"> <a class="btn" href="{:U('step_0')}">+新增公众号</a> </div>
      </div>
      <div class="data-table" style="margin:0;">
        <notempty name="list_data[0]">
          <div class="table-striped">
            <table cellspacing="1">
              <!-- 表头 -->
              <thead>
                <tr>
                  <th width="8%">公众号ID</th>
                  <th  width="10%">公众号名称</th>
                  <th  width="15%">原始ID</th>
                  <th  width="15%">AppID</th>

                  <!--<th  width="10%">管理员数</th>-->
                  <th  width="45%">操作</th>
                </tr>
              </thead>
              
              <!-- 列表 -->
              <tbody>
                <volist name="list_data[0]" id="data">
                  <tr>
                    <td>{$data.id}</td>
                    <td>{$data.public_name}</td>
                    <td>{$data.token}</td>
                    <td>{$data.appid}</td>

                    <!--<td>{$data.count}</td>-->
                    <td>
                    <a href="{:U('Home/Index/main',array('wpid'=>$data[id]))}" target="_self">进入管理</a>&nbsp;&nbsp;&nbsp; 
                    <a href="{:U('Home/Apps/check_res',['id'=>$data[id]])}" target="_self">自动检测</a>&nbsp;&nbsp;&nbsp; 
                    <php>if($data['is_creator']) { </php>
                    <a href="{:U('Home/AppsLink/lists',['mp_id'=>$data[id]])}" target="_self">管理员配置</a>&nbsp;&nbsp;&nbsp;
                      <php>if(!C('PUBLIC_BIND') || !$data['is_bind']) { </php>
                      <a href="{:U('step_0',['id'=>$data[id]])}" target="_self">编辑</a>&nbsp;&nbsp;&nbsp;
                      <a href="{:U('payment_set',['id'=>$data[id]])}" target="_self">微信支付</a>&nbsp;&nbsp;&nbsp;
                      <php> } }</php>
                    <a href="javascript:;" onclick="do_del('{$data.id}')" >删除</a>
                   </td>
                  </tr>
                </volist>
              </tbody>
            </table>
          </div>
          <else />
          <div style="padding:100px; text-align:center;"><img style="vertical-align:middle;" src="__IMG__/weixin.png"/> 你还没有创建公众号</div>
        </notempty>
      </div>
    </section>
  </div>
  <div class="wrap" style="clear:both; margin:30px auto;">
    <section class="tab-content" id="contents">
      <div style="overflow:hidden; zoom:1;">
        <h3 style=" float:left;margin-bottom:15px;"><img style="vertical-align:middle; height:25px" src="__IMG__/user_icon.png"/> 我的小程序</h3>
        <div style="margin:0 0 15px 0; float:right"> <a class="btn" href="{:U('step_miniapp_0')}">+新增小程序</a> </div>
      </div>
      <div class="data-table" style="margin:0">
      <notempty name="list_data[1]">
        <div class="table-striped">
          <table cellspacing="1">
            <!-- 表头 -->
            <thead>
              <tr>
                <th width="8%">小程序ID</th>
                <th  width="10%">小程序名称</th>
                <th  width="15%">原始ID</th>
                  <th  width="15%">AppID</th>
               
                <!--<th  width="10%">管理员数</th>-->
                <th  width="45%">操作</th>
              </tr>
            </thead>
            
            <!-- 列表 -->
            <tbody>
              <volist name="list_data[1]" id="data">
                <tr>
                  <td>{$data.id}</td>
                  <td>{$data.public_name}</td>
                  <td>{$data.token}</td>
                  <td>{$data.appid}</td>
                 
                  <!--<td>{$data.count}</td>-->
                  <td>
                  <a href="{:U('WeiUserCenter/WeiUserCenter/lists',['wpid'=>$data[id]])}" target="_self">进入管理</a>&nbsp;&nbsp;&nbsp; 
                  <php>if($data['is_creator']) { </php>
                        <!--<a href="{:U('Home/AppsLink/lists',['mp_id'=>$data[id]])}" target="_self">管理员配置</a>&nbsp;&nbsp;&nbsp;                 -->     
                        <a href="{:U('step_miniapp_0',['id'=>$data[id]])}" target="_self">编辑</a>&nbsp;&nbsp;&nbsp;  
                        <a href="{:U('payment_set',['id'=>$data[id]])}" target="_self">微信支付</a>&nbsp;&nbsp;&nbsp;
                  <php> } </php>                
                  <a href="javascript:;" onclick="do_del('{$data.id}')" >删除</a>
                  </td>
                </tr>
              </volist>
            </tbody>
          </table>
        </div>
        </notempty>
      </div>
    </section>
  </div>
  
</block>
<block name="script"> 
  <script type="text/javascript">
//搜索功能
function do_del(id){
	var msg='您确定要删除吗？';
	if(confirm(msg)){
		var url="{:U('del')}";
// 		alert(url);
		$.post(url,{'id':id},function(){
			location.reload();
		});
	}
}
</script> 
</block>
